<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8"/>
        <title>01test</title>
        <script src="js/jquery-1.12.4.min.js"></script>
    </head>
    <body>
        <ul>
            <li title='hello'>111</li>
            <li title='hello'>222</li>
            <li class="box">333</li>
            <li>444</li>
            <li class="box">555</li>
        </ul>
    </body>
    <script>
       // $('li.box').css('background','red');
       
       $('li').filter('.box').css('background','green');    //filter是过滤器
       
       $('li').filter('[title=hello]').css('background','#ccc');
    </script>
</html>